package operation;

import book.BookList;

public class FindBook {
    public int findBook(BookList bookList, String name){
        int i = 0;
        for(i = 0; i < bookList.getUsedSize(); i++){
            if(name.equals(bookList.getBook(i).getName())){
                return i;
            }
        }
        return -1;
    }
}
